API Documentation
Public Member Functions | List of all members
nkGraphics::MeshDecoder Class Referenceabstract

Base class for a mesh data decoder. More...

Inheritance diagram for nkGraphics::MeshDecoder:
nkGraphics::GltfMeshDecoder nkGraphics::ObjMeshDecoder

Public Member Functions

 MeshDecoder ()
 
virtual ~MeshDecoder ()
 
virtual bool canDecode (const std::string_view &sources)=0
 
virtual bool decode (const std::string_view &sources, Mesh *outMesh)=0
 

Detailed Description

Base class for a mesh data decoder.

Constructor & Destructor Documentation

◆ MeshDecoder()

nkGraphics::MeshDecoder::MeshDecoder ( )

Constructor.

◆ ~MeshDecoder()

virtual nkGraphics::MeshDecoder::~MeshDecoder ( )
virtual

Destructor.

Member Function Documentation

◆ canDecode()

virtual bool nkGraphics::MeshDecoder::canDecode ( const std::string_view &  sources)
pure virtual
Parameters
sourcesThe path of the source file to decode, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
Returns
Whether the decoder can decode the data pointed by the path (true) or not (false).

Implemented in nkGraphics::GltfMeshDecoder, and nkGraphics::ObjMeshDecoder.

◆ decode()

virtual bool nkGraphics::MeshDecoder::decode ( const std::string_view &  sources,
Mesh outMesh 
)
pure virtual

Decodes a file and fill the mesh provided with the data decoded.

Parameters
sourcesThe path of the source file to decode, relative to the working directory. See nkResource::ResourceManager for path naming conventions.
outMeshThe mesh where the data will be copied to.
Returns
If the decoding went well (true) or not (false).

Implemented in nkGraphics::GltfMeshDecoder, and nkGraphics::ObjMeshDecoder.


The documentation for this class was generated from the following file: